package org.gastomuito.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class GastoMuito implements EntryPoint {

    private final ContabilidadeServiceAsync contabilidadeService = GWT
            .create(ContabilidadeService.class);

    public GastoMuito() {
    }

    /**
     * This is the entry point method.
     */
    public void onModuleLoad() {
        final Label errorLabel = new Label();
        final DespesaPanel despesaPanel = new DespesaPanel();
        final ReceitaPanel receitaPanel = new ReceitaPanel();
        new ContaContabilController(contabilidadeService, receitaPanel,
                despesaPanel);
        RootPanel.get("errorLabelContainer").add(errorLabel);
        RootPanel.get("content").add(despesaPanel.asWidget());
        RootPanel.get("content").add(receitaPanel.asWidget());

    }

}
